const obj = {}
let num = 18
Object.defineProperty(obj,'age',{
    // value:18,
    // writable:false,
    enumerable:false,
    configurable:false,
    get(){
        console.log('触发了获取')
        return num
    },
    set(data){
        console.log('触发了设置')
        num = data
    }
})
obj.age = 20
console.log(obj.age)
console.log(Object.keys(obj))
delete obj.age
console.log(Object.keys(obj))